import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNextInt()) {
            int n = in.nextInt();
            if (n == 0) {
                break;
            } else if (n == 1) {
                System.out.println(0);
            } else if (n == 2 || n == 3) {
                System.out.println(1);
            } else {
                int count = 1;
                while (n > 3) {
                    if (n % 3 == 0) {
                        n /= 3;
                    } else {
                        n = n / 3 + 1;
                    }
                    count++;
                }
                System.out.println(count);
            }
        }
    }
}
